import 'package:flutter/material.dart';

class Widget_IndexedStack_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: Text("IndexedStack"),
          ),
          body: IndexedStack(
            index: 2,
            alignment: Alignment.center,
            children: <Widget>[
              Text("第一层"),
              Text("第二层"),
              Text("第三层"),
            ],
          )
      ),
    );
  }
}

/**
 *  集成自Stack，用来显示第index个child，
 *  IndexedStack({
    Key key,
    AlignmentGeometry alignment = AlignmentDirectional.topStart,
    TextDirection textDirection,
    StackFit sizing = StackFit.loose,
    this.index = 0,
    List<Widget> children = const <Widget>[],
    })
 */
